import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  searchMenuSpan: 6,
  viewBtn: true,
  column: [
    {
      type: 'input',
      label: '父位置',
      prop: 'parentName',
      span: 12,
      required: false,
      display: false,
      parent: true,
      width: 200,
      value: 0,
      search: true
    },
    {
      type: 'input',
      label: '位置名称',
      span: 24,
      display: true,
      prop: 'name',
      search: true
    },
    {
      type: 'input',
      label: '位置编码',
      addDisplay: false,
      editDisabled: true,
      width: 140,
      prop: 'code',
      span: 24,
      rules: []
    },
    {
      type: 'tree',
      label: '房间名称',
      prop: 'houseId',
      width: 140,
      span: 24,
      rules: [{ required: true, message: '请选择房间名称' }],
      required: true,
      display: true,
      hide: true,
      parent: true
    },
    {
      type: 'input',
      label: '房间名称',
      prop: 'houseName',
      width: 140,
      span: 24,
      rules: [{ required: true, message: '请选择房间名称' }],
      required: true,
      search: true,
      display: false,
      parent: true
    },
    {
      type: 'input',
      label: '床位编码',
      prop: 'assetNumber',
      span: 12,
      rules: []
    },
    {
      type: 'number',
      label: '面积',
      prop: 'area',
      span: 12,
      append: '平米',
      rules: []
    },
    {
      type: 'number',
      label: '租金',
      prop: 'rent',
      span: 12
    },
    {
      type: 'select',
      label: '状态',
      prop: 'status',
      span: 12,
      cascaderItem: [],
      display: true,
      dicUrl: `${services.adminService}dict/type/pos_status`,
      dicMethod: 'get',
      props: { label: 'label', value: 'value' },
      required: true,
      rules: [{ required: true, message: '请选择入住性别' }]
    },
    {
      type: 'number',
      label: '排序号',
      prop: 'ordernumber',
      span: 12,
      editDisabled: true,
      addDisplay: false
    },
    {
      type: 'textarea',
      label: '备注',
      prop: 'remarks',
      span: 24,
      display: true
    }
  ]
}
